package huzh.foundation.util;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 *<p>title:MethodInvoker</p>
 *<p>description:</p>
 * @since 2014-6-6
 * @author huzh
 * @version 1.0
 */
public class MethodInvoker {
    public static Object dynaCall(Object c, String m, ArgumentHolder a)
        throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        Method meth = c.getClass().getMethod(m, a.getArgumentClasses());
        return meth.invoke(c, a.getArguments());
    }
}
